using System;
using System.Windows.Threading;

namespace SmartLib.Common
{
	/// <summary>
	/// Interface for DispatcherFacade
	/// </summary>
	public interface IDispatcherFacade
	{
		/// <summary>
		/// Invokes method by default dispatcher (if required).
		/// </summary>
		/// <param name="priority">The priority.</param>
		/// <param name="method">The method.</param>
		/// <param name="args">The args.</param>
		/// <returns></returns>
		object InvokeIfRequired(DispatcherPriority priority, Delegate method, params object[] args);

		/// <summary>
		/// Begins the async invokation of method.
		/// </summary>
		/// <param name="priority">The priority.</param>
		/// <param name="method">The method.</param>
		/// <param name="args">The args.</param>
		void BeginInvoke(DispatcherPriority priority, Delegate method, params object[] args);
	}
}